#include <allegro.h>
#include <stdlib.h>

int main(void){


    allegro_init();
    install_keyboard();
    install_timer();

    int ret = set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,480,0,0);
    if(ret != 0){
        allegro_message(allegro_error);
        return 1;
    }

    textout_ex(screen, font, "This was displayed by textout",0,10,15,-1);

    textout_centre_ex(screen,font, "Sample of textout_centre function", SCREEN_W/2, 50, 14, -1);
    textout_justify_ex(screen, font, "Sample output by textout_justify", SCREEN_W/2 - 200, SCREEN_W/2+200,100,200,13,-1);
    textprintf_ex(screen, font, 0, 150, 12, -1, "Screen resolution = %i x %i", SCREEN_W, SCREEN_H);
    textprintf_centre_ex(screen, font, SCREEN_W/2, 200,10,-1, "%s, %s!", "Hello", "World");
    textprintf_justify(screen, font, SCREEN_W/2 -200, SCREEN_W/2 + 200, 250,400,7, "A L L E G R O !");

    while(!key[KEY_ESC]){}

    allegro_exit();
    return 0;

}
END_OF_MAIN()
